Skip to content

Support endf.Material in from_endf methods#3932

Open
paulromano wants to merge 1 commit into
openmc-dev:developfrom
paulromano:endf-material-compat
Open

Support endf.Material in from_endf methods#3932
paulromano wants to merge 1 commit into
openmc-dev:developfrom
paulromano:endf-material-compat

Conversation

@paulromano
Copy link
Copy Markdown
Contributor

Description

This PR updates the various from_endf methods on classes within openmc.data to function properly when passed an endf.Material object (which effectively replaces the Evaluation class from OpenMC). This is meant to be an alternative to the solution proposed in paulromano/endf-python#40.

Let me know what you think @shimwell!

Checklist

  • I have performed a self-review of my own code
  • I have run clang-format (version 18) on any C++ source files (if applicable)
  • I have followed the style guidelines for Python source files (if applicable)
  • I have made corresponding changes to the documentation (if applicable)
  • I have added tests that prove my fix is effective or that my feature works (if applicable)

@paulromano paulromano requested a review from shimwell April 29, 2026 19:44
@shimwell shimwell self-assigned this Apr 29, 2026
@shimwell
Copy link
Copy Markdown
Member

shimwell commented May 26, 2026

I think this is good to go, I just noticed some docstrings that can be optionally considered for updating

Routing through as_evaluation means these methods now accept a str path too which might want to be added to their docstring

File Method
openmc/data/reaction.py:1154 Reaction.from_endf
openmc/data/angle_distribution.py:216 AngleDistribution.from_endf
openmc/data/resonance.py:82 Resonances.from_endf
openmc/data/resonance_covariance.py:77 ResonanceCovariances.from_endf
openmc/data/photon.py:1069 PhotonReaction.from_endf
openmc/data/fission_energy.py:199 FissionEnergyRelease.from_endf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants